<template>
  <div class="slider_content">
    <!-- 问卷 -->
    <template v-if="type === 1">
      <QuestionnaireSilder
        :examList="examList"
        :contentList="contentList"
        @handleExam="handleExam"
      />
    </template>

    <!-- 表单 -->
    <template v-else-if="type === 2">
      <!-- TODO -->
    </template>
  </div>
</template>

<script lang="ts">
import QuestionnaireSilder from '@/components/design/questionnaire/QuestionnaireSilder.vue';
import { QuestType } from '@/store/design/types';
import { defineComponent, ref } from 'vue';
export default defineComponent({
  components: { QuestionnaireSilder },
  props: {
    /** 题目列表 */
    examList: { type: Array, default: () => [] },
    /** 问卷类型 */
    type: { type: Number, default: 1 },
    /** 题列表 */
    contentList: { type: Array, default: () => [] },
  },
  emits: [/** 点击天机题型 */ 'handleExam'],
  setup(props, { emit }) {
    const handleExam = (value: QuestType) => {
      emit('handleExam', value);
    };
    return { activeKey: ref('1'), handleExam };
  },
});
</script>
<style lang="less" scoped>
.slider_content {
  width: 230px;
  height: calc(100vh - 64px);
  overflow: hidden;
  padding: 8px;
  box-shadow: 0px 0px 4px 0px #dfdfdf;
  background-color: white;
}
</style>
